﻿using Transformable_Engine_v2.Engine.Transformable_Math.Geometry;

namespace AngryManagementMayhem.Controller.Player
{
    public class InputState
    {
        public bool Up { get; set; } 
        public bool Down { get; set; } 
        public bool Left { get; set; } 
        public bool Right { get; set; }

        public bool IsCharging { get; set; }
        public bool IsDashing { get; set; }

        public TE_Vector2 LatestDirection { get; set; }

        public InputState()
        {
            Up = false;
            Down = false;
            Left = false;
            Right = false;
            IsCharging = false;
            IsDashing = false;
            LatestDirection = TE_Vector2.UnitX;
        }

        public TE_Vector2 GetDirection()
        {
            var result = new TE_Vector2((Left ? -1 : 1) + (Right ? 1 : -1), 0);

            return result;
        }
    }
}